package com.zhang.hadoop.testMain;

import org.apache.commons.io.FileUtils;
import org.junit.Test;

import java.io.File;
import java.util.Collection;
import java.util.HashMap;
import java.util.Map;

/**
 * @author ：zhangyufei.zhang
 * @date ：Created in 2021-09-03 13:53
 * @description：
 */
public class Test6 {

    @Test
    public void test1() {
        try {
            String srcDirPath = "D:\\5-学习\\2-笔记\\设计模式\\代码\\DesignPattern\\src\\com\\zhang.designPattern";
            // 转为UTF-8编码格式源码路径
            String utf8DirPath = "D:\\5-学习\\2-笔记\\设计模式\\代码\\utf-8\\designPattern";

            // 获取所有java文件
            Collection<File> javaGbkFileCol = FileUtils.listFiles(new File(srcDirPath), new String[]{"java"}, true);

            for (File javaGbkFile : javaGbkFileCol) {
                System.out.println(javaGbkFile);
                // UTF8格式文件路径
                String utf8FilePath = utf8DirPath + javaGbkFile.getAbsolutePath().substring(srcDirPath.length());
                // 使用GBK读取数据，然后用UTF-8写入数据
                FileUtils.writeLines(new File(utf8FilePath), "UTF-8", FileUtils.readLines(javaGbkFile, "GBK"));
            }
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    @Test
    public void test2() {
        String str = "JD009101,\n" +
                "JD009100,\n" +
                "JD009099,\n" +
                "JD009098,\n" +
                "JD009097,\n" +
                "JD009096,\n" +
                "JD009095,\n" +
                "JD009094,\n" +
                "JD009092,\n" +
                "JD009091,\n" +
                "JD009089,\n" +
                "JD009088,\n" +
                "JD009087,\n" +
                "JD009075,\n" +
                "JD009086,\n" +
                "JD009073,\n" +
                "JD009073,\n" +
                "JD009071,\n" +
                "JD009071,\n" +
                "JD009070,\n" +
                "JD009069,\n" +
                "JD009068,\n" +
                "JD009067,\n" +
                "JD009065,\n" +
                "JD009064,\n" +
                "JD009062,\n" +
                "JD009061,\n" +
                "JD009059,\n" +
                "JD009058,\n" +
                "JD009131,\n" +
                "JD009066,\n" +
                "JD009057,\n" +
                "JD009056,\n" +
                "JD009159,\n" +
                "JD009159,\n" +
                "JD009130,\n" +
                "JD009039,\n" +
                "JD009029,\n" +
                "JD009028,\n" +
                "JD009026,\n" +
                "JD009015,\n" +
                "JD009013,\n" +
                "JD009011,\n" +
                "JD009008,\n" +
                "JD009006,\n" +
                "JD009004,\n" +
                "JD009001,\n" +
                "JD008999,\n" +
                "JD008997,\n" +
                "JD008985,\n" +
                "JD008985,\n" +
                "JD008983,\n" +
                "JD008955,\n" +
                "JD008978,\n" +
                "JD008953,\n" +
                "JD008929,\n" +
                "JD008927,\n" +
                "JD008924,\n" +
                "JD008917,\n" +
                "JD008916,\n" +
                "JD009129,\n" +
                "JD009045,\n" +
                "JD009043,\n" +
                "JD009041,\n" +
                "JD009040,\n" +
                "JD009038,\n" +
                "JD009037,\n" +
                "JD009036,\n" +
                "JD009035,\n" +
                "JD009034,\n" +
                "JD009032,\n" +
                "JD009031,\n" +
                "JD009027,\n" +
                "JD009010,\n" +
                "JD009009,\n" +
                "JD009007,\n" +
                "JD009005,\n" +
                "JD009002,\n" +
                "JD009002,\n" +
                "JD008998,\n" +
                "JD008996,\n" +
                "JD008979,\n" +
                "JD008977,\n" +
                "JD008931,\n" +
                "JD008930,\n" +
                "JD008928,\n" +
                "JD008926,\n" +
                "JD008925,\n" +
                "JD008922,\n" +
                "JD008921,\n" +
                "JD008905,\n" +
                "JD008903,\n" +
                "JD008976,\n" +
                "JD009128,\n" +
                "JD008487,\n" +
                "JD008486,\n" +
                "JD008919,\n" +
                "JD008348,\n" +
                "JD008335,\n" +
                "JD008324,\n" +
                "JD008327,\n" +
                "JD008261,\n" +
                "JD007929,\n" +
                "JD007929,\n" +
                "JD007463,\n" +
                "JD007412,\n" +
                "JD007411,\n" +
                "JD007561,\n" +
                "JD007542,\n" +
                "JD007518,\n" +
                "JD007516,\n" +
                "JD007260,\n" +
                "JD007052,\n" +
                "JD006398,\n" +
                "JD006418,\n" +
                "JD006417,\n" +
                "JD006400,\n" +
                "JD009127,\n" +
                "JD008975,\n" +
                "JD006254,\n" +
                "JD008974,\n" +
                "JD006300,\n" +
                "JD006232,\n" +
                "JD006233,\n" +
                "JD006231,\n" +
                "JD009125,\n" +
                "JD009124,\n" +
                "JD006214,\n" +
                "JD009136,\n" +
                "JD006209,\n" +
                "JD009126,\n" +
                "JD009134,\n" +
                "JD009122,\n" +
                "JD008972,\n" +
                "JD009121,\n" +
                "JD009118,\n" +
                "JD009117,\n" +
                "JD009116,\n" +
                "JD008971,\n" +
                "JD009119,\n" +
                "JD009105,\n" +
                "JD009103,\n" +
                "JD009161,\n" +
                "JD009157,\n" +
                "JD009156,\n" +
                "JD009153,\n" +
                "JD008969,\n" +
                "JD009162,\n" +
                "JD009160,\n" +
                "JD009152,\n" +
                "JD009150,\n" +
                "JD008968,\n" +
                "JD009148,\n" +
                "JD009147,\n" +
                "JD008967,\n" +
                "JD009158,\n" +
                "JD009155,\n" +
                "JD009149,\n" +
                "JD008966,\n" +
                "JD008981,\n" +
                "JD008980,\n" +
                "JD008918";
        checkRepetition(str);
    }

    @Test
    public void test3() {
        String str = "JD007524,\n" +
                "JD007523,\n" +
                "JD007522,\n" +
                "JD007520,\n" +
                "JD007515,\n" +
                "JD007513,\n" +
                "JD007514,\n" +
                "JD007512,\n" +
                "JD007506,\n" +
                "JD007502,\n" +
                "JD007500,\n" +
                "JD007498,\n" +
                "JD007475,\n" +
                "JD007471,\n" +
                "JD007467,\n" +
                "JD007466,\n" +
                "JD007465,\n" +
                "JD007464,\n" +
                "JD007461,\n" +
                "JD007461,\n" +
                "JD007459,\n" +
                "JD007436,\n" +
                "JD007435,\n" +
                "JD007434,\n" +
                "JD007433,\n" +
                "JD007432,\n" +
                "JD007430,\n" +
                "JD007428,\n" +
                "JD007427,\n" +
                "JD007426,\n" +
                "JD007423,\n" +
                "JD007421,\n" +
                "JD007419,\n" +
                "JD007416,\n" +
                "JD007414,\n" +
                "JD007410,\n" +
                "JD007410,\n" +
                "JD007408,\n" +
                "JD007406,\n" +
                "JD007405,\n" +
                "JD007403,\n" +
                "JD007398,\n" +
                "JD007396,\n" +
                "JD007386,\n" +
                "JD007384,\n" +
                "JD007382,\n" +
                "JD007380,\n" +
                "JD007373,\n" +
                "JD007771,\n" +
                "JD007647,\n" +
                "JD007641,\n" +
                "JD007642,\n" +
                "JD007640,\n" +
                "JD007639,\n" +
                "JD007638,\n" +
                "JD007637,\n" +
                "JD007621,\n" +
                "JD007613,\n" +
                "JD007611,\n" +
                "JD007609,\n" +
                "JD007601,\n" +
                "JD007600,\n" +
                "JD007599,\n" +
                "JD007595,\n" +
                "JD007594,\n" +
                "JD007589,\n" +
                "JD007588,\n" +
                "JD007568,\n" +
                "JD007558,\n" +
                "JD007550,\n" +
                "JD007548,\n" +
                "JD007545,\n" +
                "JD007510,\n" +
                "JD007508,\n" +
                "JD007378,\n" +
                "JD007375,\n" +
                "JD007504,\n" +
                "JD007343,\n" +
                "JD007342,\n" +
                "JD007309,\n" +
                "JD007307,\n" +
                "JD007305,\n" +
                "JD007304,\n" +
                "JD007302,\n" +
                "JD007301,\n" +
                "JD007267,\n" +
                "JD007266,\n" +
                "JD007264,\n" +
                "JD007262,\n" +
                "JD007258,\n" +
                "JD007257,\n" +
                "JD007255,\n" +
                "JD007254,\n" +
                "JD007253,\n" +
                "JD007252,\n" +
                "JD007251,\n" +
                "JD007249,\n" +
                "JD007247,\n" +
                "JD007245,\n" +
                "JD007242,\n" +
                "JD007239,\n" +
                "JD007241,\n" +
                "JD007365,\n" +
                "JD007363,\n" +
                "JD007358,\n" +
                "JD007354,\n" +
                "JD007352,\n" +
                "JD007344,\n" +
                "JD007339,\n" +
                "JD007326,\n" +
                "JD007324,\n" +
                "JD007319,\n" +
                "JD007310,\n" +
                "JD007308,\n" +
                "JD007306,\n" +
                "JD007263,\n" +
                "JD007261,\n" +
                "JD007250,\n" +
                "JD007248,\n" +
                "JD007244,\n" +
                "JD007243,\n" +
                "JD007240,\n" +
                "JD007200,\n" +
                "JD007503,\n" +
                "JD007126,\n" +
                "JD007123,\n" +
                "JD007121,\n" +
                "JD007118,\n" +
                "JD007116,\n" +
                "JD007115,\n" +
                "JD007114,\n" +
                "JD007113,\n" +
                "JD007085,\n" +
                "JD007078,\n" +
                "JD007065,\n" +
                "JD007022,\n" +
                "JD007021,\n" +
                "JD007020,\n" +
                "JD007018,\n" +
                "JD007017,\n" +
                "JD007236,\n" +
                "JD007188,\n" +
                "JD007187,\n" +
                "JD007186,\n" +
                "JD007185,\n" +
                "JD007184,\n" +
                "JD007183,\n" +
                "JD007182,\n" +
                "JD007181,\n" +
                "JD007180,\n" +
                "JD007179,\n" +
                "JD007178,\n" +
                "JD007177,\n" +
                "JD007171,\n" +
                "JD007145,\n" +
                "JD007120,\n" +
                "JD007119,\n" +
                "JD007117,\n" +
                "JD007112,\n" +
                "JD007088,\n" +
                "JD007084,\n" +
                "JD007082,\n" +
                "JD007080,\n" +
                "JD007076,\n" +
                "JD007069,\n" +
                "JD007064,\n" +
                "JD007016,\n" +
                "JD006967,\n" +
                "JD006965,\n" +
                "JD006748,\n" +
                "JD006375,\n" +
                "JD006461,\n" +
                "JD006462,\n" +
                "JD006460,\n" +
                "JD006326,\n" +
                "JD006324,\n" +
                "JD006322,\n" +
                "JD006321,\n" +
                "JD006325,\n" +
                "JD006262,\n" +
                "JD006226,\n" +
                "JD006225,\n" +
                "JD009120,\n" +
                "JD008970,\n" +
                "JD009132,\n" +
                "JD009151,\n" +
                "JD009199,\n" +
                "JD009198,\n" +
                "JD009192,\n" +
                "JD006198,\n" +
                "JD006164,\n" +
                "JD009090,\n" +
                "JD009060,\n" +
                "JD009030,\n" +
                "JD009000,\n" +
                "JD008949,\n" +
                "JD008948,\n" +
                "JD008947,\n" +
                "JD008944,\n" +
                "JD008943,\n" +
                "JD008942,\n" +
                "JD008941,\n" +
                "JD008939,\n" +
                "JD008937,\n" +
                "JD008936,\n" +
                "JD008933,\n" +
                "JD008932,\n" +
                "JD008951,\n" +
                "JD008950,\n" +
                "JD008946,\n" +
                "JD008945,\n" +
                "JD008940,\n" +
                "JD008938,\n" +
                "JD008935,\n" +
                "JD008934,\n" +
                "JD008920,\n" +
                "JD008883,\n" +
                "JD008882,\n" +
                "JD008873,\n" +
                "JD008869,\n" +
                "JD008860,\n" +
                "JD008859,\n" +
                "JD008753,\n" +
                "JD008752,\n" +
                "JD008748,\n" +
                "JD008746,\n" +
                "JD008731,\n" +
                "JD008725,\n" +
                "JD008724,\n" +
                "JD008719,\n" +
                "JD008717,\n" +
                "JD008715,\n" +
                "JD008715,\n" +
                "JD008713,\n" +
                "JD008709,\n" +
                "JD008708,\n" +
                "JD008707,\n" +
                "JD008704,\n" +
                "JD008701,\n" +
                "JD008686,\n" +
                "JD008685,\n" +
                "JD008682,\n" +
                "JD008680,\n" +
                "JD008677,\n" +
                "JD008650,\n" +
                "JD008645,\n" +
                "JD008640,\n" +
                "JD008639,\n" +
                "JD008625,\n" +
                "JD008845,\n" +
                "JD008844,\n" +
                "JD008831,\n" +
                "JD008827,\n" +
                "JD008826,\n" +
                "JD008825,\n" +
                "JD008824,\n" +
                "JD008823,\n" +
                "JD008817,\n" +
                "JD008793,\n" +
                "JD008783,\n" +
                "JD008780,\n" +
                "JD008776,\n" +
                "JD008762,\n" +
                "JD008761,\n" +
                "JD008760,\n" +
                "JD008759,\n" +
                "JD008751,\n" +
                "JD008750,\n" +
                "JD008749,\n" +
                "JD008747,\n" +
                "JD008745,\n" +
                "JD008744,\n" +
                "JD008742,\n" +
                "JD008740,\n" +
                "JD008738,\n" +
                "JD008737,\n" +
                "JD008729,\n" +
                "JD008732,\n" +
                "JD008671,\n" +
                "JD008670,\n" +
                "JD008667,\n" +
                "JD008665,\n" +
                "JD008503,\n" +
                "JD008501,\n" +
                "JD008500,\n" +
                "JD008498,\n" +
                "JD008497,\n" +
                "JD008496,\n" +
                "JD008495,\n" +
                "JD008484,\n" +
                "JD008483,\n" +
                "JD008481,\n" +
                "JD008482,\n" +
                "JD008451,\n" +
                "JD008450,\n" +
                "JD008449,\n" +
                "JD008448,\n" +
                "JD008447,\n" +
                "JD008446,\n" +
                "JD008444,\n" +
                "JD008445,\n" +
                "JD008813,\n" +
                "JD008801,\n" +
                "JD008800,\n" +
                "JD008794,\n" +
                "JD008789,\n" +
                "JD008785,\n" +
                "JD008781,\n" +
                "JD008777,\n" +
                "JD008778,\n" +
                "JD008774,\n" +
                "JD008773,\n" +
                "JD008763,\n" +
                "JD008726,\n" +
                "JD008718,\n" +
                "JD008714,\n" +
                "JD008712,\n" +
                "JD008706,\n" +
                "JD008705,\n" +
                "JD008702,\n" +
                "JD008684,\n" +
                "JD008683,\n" +
                "JD008681,\n" +
                "JD008679,\n" +
                "JD008678,\n" +
                "JD008674,\n" +
                "JD008669,\n" +
                "JD008668,\n" +
                "JD008659,\n" +
                "JD008655,\n" +
                "JD008653,\n" +
                "JD008637,\n" +
                "JD008632,\n" +
                "JD008626,\n" +
                "JD008336,\n" +
                "JD008334,\n" +
                "JD008333,\n" +
                "JD008319,\n" +
                "JD008314,\n" +
                "JD008308,\n" +
                "JD008306,\n" +
                "JD008656,\n" +
                "JD008420,\n" +
                "JD008414,\n" +
                "JD008322,\n" +
                "JD008310,\n" +
                "JD008305,\n" +
                "JD008299,\n" +
                "JD008259,\n" +
                "JD008257,\n" +
                "JD008247,\n" +
                "JD008196,\n" +
                "JD008193,\n" +
                "JD008191,\n" +
                "JD008189,\n" +
                "JD008188,\n" +
                "JD008187,\n" +
                "JD008186,\n" +
                "JD008184,\n" +
                "JD008175,\n" +
                "JD008174,\n" +
                "JD008173,\n" +
                "JD008172,\n" +
                "JD008171,\n" +
                "JD008170,\n" +
                "JD008165,\n" +
                "JD008158,\n" +
                "JD008157,\n" +
                "JD008156,\n" +
                "JD008258,\n" +
                "JD008256,\n" +
                "JD008250,\n" +
                "JD008249,\n" +
                "JD008222,\n" +
                "JD008205,\n" +
                "JD008198,\n" +
                "JD008169,\n" +
                "JD008168,\n" +
                "JD008167,\n" +
                "JD008166,\n" +
                "JD008164,\n" +
                "JD008159,\n" +
                "JD008125,\n" +
                "JD008123,\n" +
                "JD008122,\n" +
                "JD008118,\n" +
                "JD008117,\n" +
                "JD008117,\n" +
                "JD008116,\n" +
                "JD008115,\n" +
                "JD008114,\n" +
                "JD008113,\n" +
                "JD008112,\n" +
                "JD008111,\n" +
                "JD008107,\n" +
                "JD008106,\n" +
                "JD008105,\n" +
                "JD008104,\n" +
                "JD008103,\n" +
                "JD008101,\n" +
                "JD008096,\n" +
                "JD008095,\n" +
                "JD008094,\n" +
                "JD008092,\n" +
                "JD008090,\n" +
                "JD008089,\n" +
                "JD008088,\n" +
                "JD008085,\n" +
                "JD008119,\n" +
                "JD008049,\n" +
                "JD008043,\n" +
                "JD008047,\n" +
                "JD008034,\n" +
                "JD008032,\n" +
                "JD008029,\n" +
                "JD008028,\n" +
                "JD008026,\n" +
                "JD008026,\n" +
                "JD008025,\n" +
                "JD008022,\n" +
                "JD008024,\n" +
                "JD008021,\n" +
                "JD008019,\n" +
                "JD008006,\n" +
                "JD008009,\n" +
                "JD008001,\n" +
                "JD007999,\n" +
                "JD007997,\n" +
                "JD007995,\n" +
                "JD007981,\n" +
                "JD007976,\n" +
                "JD007966,\n" +
                "JD007960,\n" +
                "JD007959,\n" +
                "JD007953,\n" +
                "JD007939,\n" +
                "JD007931,\n" +
                "JD007930,\n" +
                "JD007924,\n" +
                "JD007923,\n" +
                "JD007922,\n" +
                "JD007921,\n" +
                "JD007920,\n" +
                "JD007919,\n" +
                "JD007918,\n" +
                "JD007917,\n" +
                "JD007911,\n" +
                "JD007910,\n" +
                "JD007907,\n" +
                "JD007905,\n" +
                "JD007903,\n" +
                "JD007902,\n" +
                "JD007901,\n" +
                "JD007900,\n" +
                "JD007899,\n" +
                "JD007898,\n" +
                "JD007896,\n" +
                "JD007893,\n" +
                "JD007891,\n" +
                "JD007889,\n" +
                "JD007888,\n" +
                "JD007887,\n" +
                "JD007874,\n" +
                "JD007873,\n" +
                "JD007871,\n" +
                "JD008062,\n" +
                "JD008061,\n" +
                "JD008060,\n" +
                "JD008055,\n" +
                "JD008053,\n" +
                "JD008046,\n" +
                "JD008041,\n" +
                "JD008040,\n" +
                "JD008031,\n" +
                "JD008033,\n" +
                "JD008030,\n" +
                "JD008011,\n" +
                "JD008008,\n" +
                "JD008005,\n" +
                "JD007982,\n" +
                "JD007965,\n" +
                "JD007962,\n" +
                "JD007950,\n" +
                "JD007886,\n" +
                "JD007875,\n" +
                "JD007872,\n" +
                "JD007870,\n" +
                "JD007849,\n" +
                "JD007843,\n" +
                "JD007840,\n" +
                "JD007832,\n" +
                "JD007827,\n" +
                "JD007808,\n" +
                "JD007804,\n" +
                "JD007790,\n" +
                "JD007788,\n" +
                "JD007779,\n" +
                "JD007777,\n" +
                "JD007775,\n" +
                "JD007770,\n" +
                "JD007750,\n" +
                "JD007740,\n" +
                "JD007735,\n" +
                "JD007714,\n" +
                "JD007708,\n" +
                "JD007707,\n" +
                "JD007706,\n" +
                "JD007704,\n" +
                "JD007705,\n" +
                "JD007702,\n" +
                "JD007697,\n" +
                "JD007689,\n" +
                "JD007680,\n" +
                "JD007666,\n" +
                "JD007662,\n" +
                "JD007660,\n" +
                "JD007658,\n" +
                "JD007858,\n" +
                "JD007851,\n" +
                "JD007845,\n" +
                "JD007848,\n" +
                "JD007834,\n" +
                "JD007825,\n" +
                "JD007812,\n" +
                "JD007802,\n" +
                "JD007801,\n" +
                "JD007772,\n" +
                "JD007741,\n" +
                "JD007717,\n" +
                "JD007716,\n" +
                "JD007712,\n" +
                "JD007710,\n" +
                "JD007688,\n" +
                "JD007687,\n" +
                "JD007686,\n" +
                "JD007685,\n" +
                "JD007682,\n" +
                "JD007668,\n" +
                "JD007667,\n" +
                "JD007665,\n" +
                "JD007664,\n" +
                "JD007597,\n" +
                "JD007661,\n" +
                "JD007659,\n" +
                "JD007925,\n" +
                "JD007925,\n" +
                "JD007608,\n" +
                "JD007606,\n" +
                "JD007598,\n" +
                "JD007587,\n" +
                "JD007554,\n" +
                "JD007552,\n" +
                "JD007546,\n" +
                "JD007543,\n" +
                "JD007535";
        checkRepetition(str);
    }

    @Test
    public void test4() {
        String str = "JD009093,\n" +
                "JD009063,\n" +
                "JD009003,\n" +
                "JD008923,\n" +
                "JD009033,\n" +
                "JD008857,\n" +
                "JD008675,\n" +
                "JD008641,\n" +
                "JD008636,\n" +
                "JD008633,\n" +
                "JD008627,\n" +
                "JD008623,\n" +
                "JD008856,\n" +
                "JD008855,\n" +
                "JD008854,\n" +
                "JD008853,\n" +
                "JD008852,\n" +
                "JD008848,\n" +
                "JD008847,\n" +
                "JD008846,\n" +
                "JD008743,\n" +
                "JD008741,\n" +
                "JD008727,\n" +
                "JD008502,\n" +
                "JD008499,\n" +
                "JD008493,\n" +
                "JD008436,\n" +
                "JD008435,\n" +
                "JD008434,\n" +
                "JD008432,\n" +
                "JD008429,\n" +
                "JD008654,\n" +
                "JD008638,\n" +
                "JD008635,\n" +
                "JD008634,\n" +
                "JD008630,\n" +
                "JD008430,\n" +
                "JD008431,\n" +
                "JD008428,\n" +
                "JD008428,\n" +
                "JD008413,\n" +
                "JD008406,\n" +
                "JD008404,\n" +
                "JD008403,\n" +
                "JD008402,\n" +
                "JD008400,\n" +
                "JD008398,\n" +
                "JD008397,\n" +
                "JD008388,\n" +
                "JD008388,\n" +
                "JD008387,\n" +
                "JD008383,\n" +
                "JD008381,\n" +
                "JD008379,\n" +
                "JD008374,\n" +
                "JD008373,\n" +
                "JD008332,\n" +
                "JD008329,\n" +
                "JD008321,\n" +
                "JD008318,\n" +
                "JD008311,\n" +
                "JD008309,\n" +
                "JD008307,\n" +
                "JD008421,\n" +
                "JD008416,\n" +
                "JD008415,\n" +
                "JD008407,\n" +
                "JD008407,\n" +
                "JD008405,\n" +
                "JD008401,\n" +
                "JD008399,\n" +
                "JD008396,\n" +
                "JD008385,\n" +
                "JD008384,\n" +
                "JD008382,\n" +
                "JD008380,\n" +
                "JD008378,\n" +
                "JD008377,\n" +
                "JD008375,\n" +
                "JD008372,\n" +
                "JD008371,\n" +
                "JD008369,\n" +
                "JD008368,\n" +
                "JD008367,\n" +
                "JD008366,\n" +
                "JD008365,\n" +
                "JD008364,\n" +
                "JD008363,\n" +
                "JD008362,\n" +
                "JD008361,\n" +
                "JD008360,\n" +
                "JD008359,\n" +
                "JD008358,\n" +
                "JD008356,\n" +
                "JD008357,\n" +
                "JD008355,\n" +
                "JD008354,\n" +
                "JD008352,\n" +
                "JD008351,\n" +
                "JD008350,\n" +
                "JD008349,\n" +
                "JD008320,\n" +
                "JD008320,\n" +
                "JD008313,\n" +
                "JD008313,\n" +
                "JD008312,\n" +
                "JD008274,\n" +
                "JD008268,\n" +
                "JD008264,\n" +
                "JD008204,\n" +
                "JD008190,\n" +
                "JD008155,\n" +
                "JD008273,\n" +
                "JD008272,\n" +
                "JD008267,\n" +
                "JD008266,\n" +
                "JD008260,\n" +
                "JD008154,\n" +
                "JD008124,\n" +
                "JD008102,\n" +
                "JD008100,\n" +
                "JD008093,\n" +
                "JD008091,\n" +
                "JD008084,\n" +
                "JD008054,\n" +
                "JD008052,\n" +
                "JD008027,\n" +
                "JD007972,\n" +
                "JD007970,\n" +
                "JD007963,\n" +
                "JD007946,\n" +
                "JD007912,\n" +
                "JD007908,\n" +
                "JD007906,\n" +
                "JD007904,\n" +
                "JD007897,\n" +
                "JD007895,\n" +
                "JD007892,\n" +
                "JD007890,\n" +
                "JD008042,\n" +
                "JD008023,\n" +
                "JD008017,\n" +
                "JD008015,\n" +
                "JD008010,\n" +
                "JD008007,\n" +
                "JD007991,\n" +
                "JD007987,\n" +
                "JD007983,\n" +
                "JD007974,\n" +
                "JD007973,\n" +
                "JD007971,\n" +
                "JD007969,\n" +
                "JD007968,\n" +
                "JD007928,\n" +
                "JD007839,\n" +
                "JD007835,\n" +
                "JD007833,\n" +
                "JD007831,\n" +
                "JD007811,\n" +
                "JD007786,\n" +
                "JD007785,\n" +
                "JD007778,\n" +
                "JD007776,\n" +
                "JD007769,\n" +
                "JD007765,\n" +
                "JD007764,\n" +
                "JD007748,\n" +
                "JD007734,\n" +
                "JD007715,\n" +
                "JD007713,\n" +
                "JD007711,\n" +
                "JD007703,\n" +
                "JD007701,\n" +
                "JD007696,\n" +
                "JD007681,\n" +
                "JD007679,\n" +
                "JD007857,\n" +
                "JD007850,\n" +
                "JD007844,\n" +
                "JD007842,\n" +
                "JD007826,\n" +
                "JD007824,\n" +
                "JD007789,\n" +
                "JD007787,\n" +
                "JD007784,\n" +
                "JD007774,\n" +
                "JD007768,\n" +
                "JD007767,\n" +
                "JD007766,\n" +
                "JD007759,\n" +
                "JD007749,\n" +
                "JD007684,\n" +
                "JD007663,\n" +
                "JD007612,\n" +
                "JD007578,\n" +
                "JD007560,\n" +
                "JD007559,\n" +
                "JD007551,\n" +
                "JD007544,\n" +
                "JD007541,\n" +
                "JD007534,\n" +
                "JD007519,\n" +
                "JD007511,\n" +
                "JD007507,\n" +
                "JD007501,\n" +
                "JD007499,\n" +
                "JD007497,\n" +
                "JD007474,\n" +
                "JD007473,\n" +
                "JD007472,\n" +
                "JD007470,\n" +
                "JD007469,\n" +
                "JD007468,\n" +
                "JD007462,\n" +
                "JD007460,\n" +
                "JD007709,\n" +
                "JD007431,\n" +
                "JD007429,\n" +
                "JD007425,\n" +
                "JD007424,\n" +
                "JD007422,\n" +
                "JD007420,\n" +
                "JD007418,\n" +
                "JD007415,\n" +
                "JD007413,\n" +
                "JD007409,\n" +
                "JD007407,\n" +
                "JD007407,\n" +
                "JD007404,\n" +
                "JD007401,\n" +
                "JD007399,\n" +
                "JD007389,\n" +
                "JD007385,\n" +
                "JD007383,\n" +
                "JD007379,\n" +
                "JD007377,\n" +
                "JD007374,\n" +
                "JD007646,\n" +
                "JD007620,\n" +
                "JD007610,\n" +
                "JD007607,\n" +
                "JD007605,\n" +
                "JD007596,\n" +
                "JD007593,\n" +
                "JD007586,\n" +
                "JD007579,\n" +
                "JD007577,\n" +
                "JD007567,\n" +
                "JD007566,\n" +
                "JD007553,\n" +
                "JD007549,\n" +
                "JD007547,\n" +
                "JD007521,\n" +
                "JD007517,\n" +
                "JD007509,\n" +
                "JD007505,\n" +
                "JD007376,\n" +
                "JD007372,\n" +
                "JD007338,\n" +
                "JD007341,\n" +
                "JD007333,\n" +
                "JD007325,\n" +
                "JD007323,\n" +
                "JD007321,\n" +
                "JD007320,\n" +
                "JD007316,\n" +
                "JD007315,\n" +
                "JD007269,\n" +
                "JD007265,\n" +
                "JD007259,\n" +
                "JD007256,\n" +
                "JD007230,\n" +
                "JD007229,\n" +
                "JD007227,\n" +
                "JD007226,\n" +
                "JD007225,\n" +
                "JD007223,\n" +
                "JD007216,\n" +
                "JD007210,\n" +
                "JD007209,\n" +
                "JD007205,\n" +
                "JD007198,\n" +
                "JD007197,\n" +
                "JD007364,\n" +
                "JD007357,\n" +
                "JD007356,\n" +
                "JD007355,\n" +
                "JD007353,\n" +
                "JD007351,\n" +
                "JD007350,\n" +
                "JD007340,\n" +
                "JD007332,\n" +
                "JD007331,\n" +
                "JD007322,\n" +
                "JD007318,\n" +
                "JD007314,\n" +
                "JD007313,\n" +
                "JD007312,\n" +
                "JD007303,\n" +
                "JD007268,\n" +
                "JD007246,\n" +
                "JD007238,\n" +
                "JD007224,\n" +
                "JD007219,\n" +
                "JD007218,\n" +
                "JD007215,\n" +
                "JD007214,\n" +
                "JD007211,\n" +
                "JD007208,\n" +
                "JD007207,\n" +
                "JD007206,\n" +
                "JD007204,\n" +
                "JD007203,\n" +
                "JD007202,\n" +
                "JD007201,\n" +
                "JD007199,\n" +
                "JD007196,\n" +
                "JD007195,\n" +
                "JD007194,\n" +
                "JD007163,\n" +
                "JD007162,\n" +
                "JD007162,\n" +
                "JD007147,\n" +
                "JD007144,\n" +
                "JD007143,\n" +
                "JD007142,\n" +
                "JD007138,\n" +
                "JD007086,\n" +
                "JD007083,\n" +
                "JD007081,\n" +
                "JD007077,\n" +
                "JD007024,\n" +
                "JD007019,\n" +
                "JD007015,\n" +
                "JD007176,\n" +
                "JD007175,\n" +
                "JD007172,\n" +
                "JD007170,\n" +
                "JD007169,\n" +
                "JD007168,\n" +
                "JD007167,\n" +
                "JD007166,\n" +
                "JD007164,\n" +
                "JD007148,\n" +
                "JD007146,\n" +
                "JD007141,\n" +
                "JD007137,\n" +
                "JD007136,\n" +
                "JD007125,\n" +
                "JD007124,\n" +
                "JD007122,\n" +
                "JD007087,\n" +
                "JD007079,\n" +
                "JD007055,\n" +
                "JD007002,\n" +
                "JD006939,\n" +
                "JD006940,\n" +
                "JD006938,\n" +
                "JD006937,\n" +
                "JD006966,\n" +
                "JD006751,\n" +
                "JD006747,\n" +
                "JD006674,\n" +
                "JD006672,\n" +
                "JD006670,\n" +
                "JD006774,\n" +
                "JD006673,\n" +
                "JD006671,\n" +
                "JD006441,\n" +
                "JD006437,\n" +
                "JD006439,\n" +
                "JD006438,\n" +
                "JD006435,\n" +
                "JD006327,\n" +
                "JD006323,\n" +
                "JD006320,\n" +
                "JD006255,\n" +
                "JD008973,\n" +
                "JD006247,\n" +
                "JD006248,\n" +
                "JD006246,\n" +
                "JD006245,\n" +
                "JD006243,\n" +
                "JD006244,\n" +
                "JD006239,\n" +
                "JD006238,\n" +
                "JD006236,\n" +
                "JD006237,\n" +
                "JD006235,\n" +
                "JD006234,\n" +
                "JD006230,\n" +
                "JD006229,\n" +
                "JD006228,\n" +
                "JD006227,\n" +
                "JD006224,\n" +
                "JD006223,\n" +
                "JD006222,\n" +
                "JD006221,\n" +
                "JD006220,\n" +
                "JD006219,\n" +
                "JD006218,\n" +
                "JD006217,\n" +
                "JD006216,\n" +
                "JD006215,\n" +
                "JD006213,\n" +
                "JD006212,\n" +
                "JD006211,\n" +
                "JD006210,\n" +
                "JD006242,\n" +
                "JD006241,\n" +
                "JD006240,\n" +
                "JD009123,\n" +
                "JD009154,\n" +
                "JD006166";
        checkRepetition(str);
    }

    public void checkRepetition(String str) {
        String[] job = str.split(",");
        Map<String, Integer> result = new HashMap<>();
        for (int i = 0; i < job.length; i++) {
            if (result.containsKey(job[i])) {
                result.put(job[i], result.get(job[i]) + 1);
            } else {
                result.put(job[i], 1);
            }
        }
        //for (Map.Entry<String, Integer> entry : result.entrySet()) {
        //    if (entry.getValue() > 1) {
        //        System.out.println(entry.getKey() + "\t" + entry.getValue());
        //    }
        //}

        for (Map.Entry<String, Integer> entry : result.entrySet()) {
            System.out.print(entry.getKey());
        }
    }
}
